-- GENERATED SPELL FOR [Alliance Rifleman] --


function spell0_17921(pUnit, Event) --@Exploding Shot,n/a--
pUnit:FullCastSpellOnTarget(7896,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17921', 1000, 1)
end

function spell1_17921(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(32103,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17921', 576, 1)
end

function Sorts_17921(pUnit, Event)
local choix_sorts_17921 = math.random(0, 1)
if choix_sorts_17921 == 0 then
pUnit:RegisterEvent('spell0_17921', 1, 1)
end
if choix_sorts_17921 == 1 then
pUnit:RegisterEvent('spell1_17921', 1, 1)
end
end

function mob17921_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17921', math.random(1500, 3000), 1)
end

function mob17921_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17921_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17921_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17921, 1, 'mob17921_Action')
RegisterUnitEvent(17921, 2, 'mob17921_Leave')
RegisterUnitEvent(17921, 3, 'mob17921_Kill')
RegisterUnitEvent(17921, 4, 'mob17921_Die')
